﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ParserNG
{
	public partial class Parser
	{
		private List<CommandParsed> _commands;

		public List<CommandParsed> Commands
		{
			get
			{
				if (_commands == null)
					_commands = new List<CommandParsed>();

				return _commands;
			}
		}

		public void ClearCommands()
		{
			_commands = null;
		}
	}

	public partial class Scanner
	{
		public Scanner(string file)
		{
			SetSource(file); 
		}

		public void SetSource(String cmd)
		{
			this.buffer = new StringBuff(cmd);
			this.lNum = 0;
			this.cNum = -1;
			this.chr = '\n';
			GetChr();
		}
	}

	public struct  ParserValueHolder
	{
		public string String { get; set; }
		public CommandParsed CommandParsed { get; set; }
	}

	public class CommandParsed
	{
		public List<Noun> Nouns { get;set;}
		
		public CommandParsed(List<String> list)
		{
			Nouns = list;
		}
	}

}